import socket

sckt=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sckt.connect(("172.16.39.86",8087))
print("已跟172.16.39.86连接")

while True:
	msg=sckt.recv(1024)
	print(msg.decode('gb2312'))
	if(msg.decode('gb2312')=="88"):
		break;
	msg=input("->");
	sckt.send(msg.encode('gb2312'))
	if(msg=="88"):
		break;
sckt.close();